import React from "react";
import { RouteRawState } from "../types";
const Home = React.lazy(() => import("../view/home"));
const Find = React.lazy(() => import("../view/find"));
const Hot = React.lazy(() => import("../view/hot"));
const My = React.lazy(() => import("../view/my"));
const MainLayout = React.lazy(() => import("../view/mainLayout"));

const Login = React.lazy(() => import("../view/login"));
const Search = React.lazy(() => import("../view/search"));
const Sign = React.lazy(() => import("../view/sign"));
const Tags = React.lazy(() => import("../view/tags"));



export const routes: RouteRawState[] = [
  {
    path: "/",
    element: <MainLayout></MainLayout>,
    children: [
      {
        path: "/",
        element: <Home></Home>,
      },
      {
        path: "/hot",
        element: <Hot></Hot>,
      },
      {
        path: "/find",
        element: <Find></Find>,
      },
      {
        path: "/my",
        element: <My></My>,
      },
    ],
  },
  {
    path: "/login",
    element: <Login></Login>,
  },
  {
    path: "/search",
    element: <Search></Search>,
  },
  {
    path: "/sign",
    element: <Sign></Sign>,
  },
  {
    path: "/tags",
    element: <Tags></Tags>,
  },
];
